__version__ = "$Revision: 88 $"
__date__ = "$Date: 2011-07-24 18:59:29 +0200 (So, 24 Jul 2011) $"
__lastChangedBy__ = "$Author: wolters@3sconsult.de $"
__repository__ = "$HeadURL: https://sir3spy.googlecode.com/svn/Sir3sPy/Utils/trunk/DbOraUtest.py $"

"""DbOra's DocTest.
"""

def doctest_DbOra():
    """
    >>> from Sir3sPy.Utils.Db import DbOra
    >>> db=DbOra('myDb/myPw@xe')        
    >>> attrNames,edgeData=db.executeSelectScript('C:/Python31/Lib/site-packages/Sir3sPy/Data/Sir3sDbSelectOneModelAllEdges.sql',MId='M-1-0-1')
    >>> type(attrNames)
    <class 'list'>
    >>> type(edgeData)
    <class 'list'>
    >>> type(edgeData[0])
    <class 'tuple'>
    >>>   
    >>> type(edgeData[0][attrNames.index('NIDSRC')])
    <class 'str'>
    >>> type(edgeData[0][attrNames.index('NIDSNK')])
    <class 'str'>
    >>> type(edgeData[0][attrNames.index('FABS')])
    <class 'float'>
    >>> type(edgeData[0][attrNames.index('PI')])
    <class 'float'>
    >>> import collections
    >>> Edge = collections.namedtuple('Edge', attrNames)
    >>> import networkx as nx
    >>> G = nx.MultiDiGraph()
    >>> G.add_edges_from([(edge[attrNames.index('NIDSRC')],edge[attrNames.index('NIDSNK')],{'Edge':Edge._make(edge)}) for edge in edgeData])   
    """    
    
if __name__ == "__main__":
    import doctest
    doctest.testmod()
